<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><s:text name="context.title"/></title>
<%@ include file="/common/meta.jsp"%>
<link href="${ctx}/js/uploadify/uploadify.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="${ctx}/js/uploadify/jquery-ui.min.js"></script>
<script type="text/javascript" src="${ctx}/js/uploadify/swfobject.js"></script>
<script type="text/javascript" src="${ctx}/js/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" language="javascript">

        $(function() {
    		$("#FilePanel").uploadify({
    			'height'        : 30,
    			'swf'           : '${ctx}/js/uploadify/uploadify.swf',
    			'uploader'      : '${ctx}/middle/dabian/upload-pptt!upload.action',
    			'multi'         : false,
    			'auto'          : true,
    			'fileTypeExts'  : '*.ppt;*.pptx',
    			'fileTypeDesc'  : 'PPT 97-2003,PPT 2007-2010',
    			'fileObjName'   : 'uploadFile',
    			'fileSizeLimit' : '0',
    			'removeCompleted': false,
    			'buttonText'     : '选PPT并上传',
    			'uploadLimit'	: '5',
    			'formData'			: {'id':$("#tid").val()},
    		     'onUploadError'         :function(file, errorCode, errorMsg, errorString){
    				  $("#status1").text("导入失败");
    		   	     },
    		   	  'onUploadComplete'	  : function(file){
    		   	   	  window.location.reload();
    		   	   	  }
    		});
    	});
         
 </script>
</head>
<body>
<form action="spot-check" method="post" id="main">
<br/>
<p align="center"><s:actionmessage theme="mytheme" cssClass="actionMessage"/></p>
<h1 class="title01"><img src="${ctx}/images/02_15.gif" width="45" height="42" class="fl"/>上传答辩ppt</h1>
<input type="hidden" id="tid" value="${thesis.id }"/>
<s:if test="thesis.id != null">
<fieldset class="fs_ys" style="width: 600px">
<legend>抽查</legend>
	<p>题目名称:<a href="upload-ppt!input?id=${thesis.id }">${thesis.titile }</a></p>
	<p>教师姓名:${thesis.teacherName }</p>
	<p>教师职称:${thesis.teacherPost }</p>
	<p>选题学生姓名:${thesis.studentName }</p>
</fieldset>
<br/>
<s:if test="thesis.thesisFile.isSelect == 1 &&thesis.thesisFile.thesisFlag ==4">
<fieldset class="fs_ys" style="width: 600px">
<legend>中期答辩PPT上传</legend>
<center><input type="file" name="uploadFile" id="FilePanel"/></center>
</fieldset>
</s:if>
<table id="contentTable1" class="table_ys tableColor table_ys_input">
	<tr>
		<th nowrap="nowrap" colspan="">序号</th>
		<th nowrap="nowrap">文件名</th>
		<th nowrap="nowrap">文件大小</th>
		<th nowrap="nowrap">上传时间</th>
		<th nowrap="nowrap">操作</th>
	</tr>
	<s:iterator value="uploadList" var="v" status="st">
	<tr>
		<td>${st.index + 1 }&nbsp;</td>
		<td>${fileNameRemote}&nbsp;</td>
		<td>${fileSize }&nbsp;</td>
		<td><s:date format="yyyy年MM月dd日" name="#v.postedTime"/>&nbsp;</td>
		<td>
			<tc:timeControler authName="中 期">
			<s:if test="thesis.thesisFile.thesisFlag ==4">
			<a href="upload-pptt!delete?fid=${id }&id=${thesis.id}" class="ui-state-default ui-corner-al" style="padding:3px 10px;text-decoration:none;" onclick="return confirm('确定删除？')">删除</a>
			</s:if>
			</tc:timeControler>
		&nbsp;</td>
	</tr>
	</s:iterator>
</table>
</s:if>
</form>
</body>

</html>